﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddUser.aspx.cs" Inherits="Admin.User.AddUser" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>新增用户</title>
    <link href="/Admin/Css/rightbar.css?FileVersion=<%=FileVersion %>" rel="stylesheet"
        type="text/css" />
    <script src="/Admin/Scripts/Check.js?FileVersion=<%=FileVersion %>" type="text/javascript"></script>
    <script src="/Admin/Scripts/jquery-1.4.1.min.js?FileVersion=<%=FileVersion %>" type="text/javascript"></script>
</head>
<body id="wallet">
    <div class="warp">
        <div class="topnav">
            <ul>
                <li><a href="UserList.aspx"><span>管理用户</span></a></li>
                <li><a href="javascript:void(0);" style="cursor: default;" class="on_nav"><span>新增用户</span></a></li>
            </ul>
        </div>
        <div class="tab mt15">
            <ul>
                <li class="in_on"><strong>新增用户</strong></li>
                <li class="caution01">带 <span class="org">*</span> 号为必填项目</li>
            </ul>
        </div>
        <div class="cont" style="padding-top: 8px;" id="stb8">
            <form id="form1" name="form1" action="AddUser.aspx?action=add" method="post" runat="server">
            <table width="660" border="0" cellspacing="0" cellpadding="0" class="tb01">
                <tr>
                    <td align="right" valign="middle" bgcolor="#F9F9F9">
                        <span class="org">*</span>用 户 名：
                    </td>
                    <td align="left" valign="top">
                        <input type="text" id="txtUserName" name="txtUserName" class="input200_out" style="width: 240px;"
                            need="用户名不能为空！" /><span class="gray pl10">最多可输入<span class="org">20</span>个字符。</span>
                    </td>
                </tr>
                <tr>
                    <td align="right" valign="middle" bgcolor="#F9F9F9">
                        <span class="org">*</span>用户密码：
                    </td>
                    <td align="left" valign="middle">
                        <input type="password" id="txtPassword" name="txtPassword" class="input200_out" style="width: 240px;"
                            need="密码不能为空！" /><span class="gray pl10"><label id="lblHint1">密码为<span class="org">6－16</span>个字符，限用英文或数字。</label></span>
                    </td>
                </tr>
                <tr>
                    <td align="right" valign="middle" bgcolor="#F9F9F9">
                        <span class="org">*</span>真实姓名：
                    </td>
                    <td align="left" valign="top">
                        <input type="text" id="txtRealName" name="txtRealName" class="input200_out" style="width: 240px;"
                            need="真实姓名不能为空" /><span class="gray pl10">最多可输入<span class="org">20</span>个汉字。</span>
                    </td>
                </tr>
                <tr id="tr1">
                    <td align="right" valign="middle" bgcolor="#F9F9F9">
                        <span class="org">*</span>用户岗位：
                    </td>
                    <td align="left" valign="middle">
                        <select id="selGangwei" name="selGangwei" runat="server" style="width: 250px;">
                        </select><span class="gray pl10">请选择用户岗位</span>
                    </td>
                </tr>
                <tr id="tr2">
                    <td align="right" valign="middle" bgcolor="#F9F9F9">
                        <span class="org">*</span>所属部门：
                    </td>
                    <td align="left" valign="middle">
                        <select id="selDepart" name="selDepart" runat="server" style="width: 250px;">
                        </select><span class="gray pl10">请选择用户所属部门</span>
                    </td>
                </tr>
                <tr>
                    <td align="right" valign="middle" bgcolor="#F9F9F9">
                        <span class="org">*</span>电子邮箱：
                    </td>
                    <td align="left" valign="top">
                        <input type="text" id="txtEmail" name="txtEmail" class="input200_out" style="width: 240px;"
                            need="电子邮箱必须填写" email="电子邮箱格式错误" /><span class="gray pl10">最多可输入<span class="org">50</span>个字符，系统会发送重要邮件</span>
                    </td>
                </tr>
            </table>
            </form>
        </div>
        <div class="btudiv">
            <ul style="width: 180px;">
                <li>
                    <input name="Submit1" type="submit" id="Submit1" class="button_sure" onclick="return CheckForm()"
                        value="确认添加" /></li>
            </ul>
        </div>
    </div>
    <script type="text/javascript">
        function CheckForm() {
            var obj = document.getElementById("form1").elements;
            if (!checkAttr(obj)) {
                return false;
            }
            var pattern = /^[a-zA-Z0-9]{5,15}$/;
            if (!pattern.test($("#txtPassword").val())) {
                alert("新密码只能为6-16个字母或数字的组合！");
                $("#txtPassword").focus();
                return false;
            }
            $("#form1").submit();
            return true;
        }
    </script>
</body>
</html>
